package com.atguigu.tingshu.album.mapper;

import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.query.album.TrackInfoQuery;
import com.atguigu.tingshu.vo.album.AlbumTrackListVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface TrackInfoMapper extends BaseMapper<TrackInfo> {


    // 用户声音分页列表
    IPage<TrackInfo> selectUserTrackPage(Page<TrackInfo> pageParam, @Param("vo") TrackInfoQuery trackInfoQuery);

    // 更新专辑声音播放次数
    void updateTrackNum(@Param("albumId") Long albumId, @Param("orderNum") Integer orderNum);

    // 根据专辑id查询专辑声音数据
    IPage<AlbumTrackListVo> findAlbumTrackPage(Page<AlbumTrackListVo> pageParam, @Param("albumId") Long albumId);
}
